package com.rgzn.springboot222;

import com.rgzn.springboot222.service.LoginService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringBoot222Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext context
				= SpringApplication.run(SpringBoot222Application.class, args);
		context.getBean(LoginService.class).login();//可以不用管具体是哪个类实现了LoginService
	}
}
